<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加课程</title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <link rel="stylesheet" href="/ztree/css/metroStyle/metroStyle.css"/>
    <script src="/ztree/js/jquery.ztree.all.min.js"></script>
    <script src="/upload-video/plupload.full.min.js"></script>
    <link rel="stylesheet" href="/css/course/course-list-add.css"/>
</head>
<body style="background-color: #F9F9F9">
<!--title-->
<div style="margin-left: 20px;width: 93%;height: 50px;padding-top: 10px;background-color: #F1F1F1">
    <div>
        <div style="height: 30px; width: 5px;background-color:#009688 " class="l"></div>
        <h3 class="l" style="margin-top: 5px;margin-left: 5px">添加课程</h3>
        <div class="r" style="margin-right: 20px">
            <button type="button" class="layui-btn" onclick="refresh()">刷新</button>
            <button type="button" class="layui-btn" onclick="backOff()">返回</button>
        </div>
    </div>
</div>


<!--body-->
<div class="layui-row" style="margin-top: 50px">

    <!--布局占位元素-->
    <div class="layui-col-md4">
        <div style="height: 5px;width: 5px;"></div>
    </div>

    <!--主体-->
    <div class="layui-col-md8">

        <form class="layui-form" lay-filter="myForm">

            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>课程分类:</label>
                <div class="layui-input-inline" style="float: left">
                    <input id="classification" name="classification" class="layui-input" type="text" value="点击右侧按钮选择分类" >
                    <input type="hidden" name="classId">
            </div>
                <span style="float: left;margin-top: 10px" class="layui-icon" onclick="classification()">&#xe638;</span>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>课程名称:</label>
                <div class="layui-input-inline">
                    <input name="courseName" class="layui-input" type="text">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>课程介绍:</label>
                <div class="layui-input-inline">
                    <textarea name="courseIntro" class="layui-textarea" placeholder="请输入介绍内容"></textarea>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>课程价格:</label>
                <div class="layui-input-inline">
                    <input name="courseNprice" class="layui-input" type="text">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">上架/下架:</label>
                <div class="layui-input-inline">
                    <input name="courseStatus" type="checkbox" lay-filter="kg" lay-skin="switch" lay-text="上架|下架">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px;">上传视频封面图</label>
                <div class="layui-input-inline" style="width: 300px">
                    <button type="button" class="layui-btn" id="imgUpload">上传图片</button>
                    <span><i style="color: red;">注</i>：只能上传一张图片</span>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">预览图:</label>
                <div class="layui-input-inline">
                    <div style="border: 1px #D2D2D2 solid; width: 190px; height: 190px;">
                        <img style="width: 100%;height: 100%" src="" id="upload1Img">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px;">上传视频：</label>
                <div class="layui-input-inline" style="width: 300px">
                    <button type="button" class="layui-btn" id="videoUpload">上传课程视频</button>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">视频预览:</label>
                <div class="layui-input-inline">
                    <div style="border: 1px #D2D2D2 solid; width: 290px; height: 190px;">
                            <video id="uploadVideo" src="" controls="controls" autoplay="autoplay" style="width: 100%;height: 100%" >

                        </video>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>课程备注:</label>
                <div class="layui-input-inline">
                    <textarea name="courseInfo" class="layui-textarea" placeholder="请输入备注内容" style="width: 290px"></textarea>
                </div>
            </div>

            <div class="layui-form-item" style="margin-top: 30px">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline">
                    <button type="button" lay-submit lay-filter class="layui-btn" style="width: 290px;">添加课程</button>
                </div>
            </div>
            <input type="hidden" name="url" class="layui-input">
            <input type="hidden" name="courseUrl" class="layui-input">
        </form>

    </div>


</div>

<div style="width: 10px;height: 200px;">

</div>
</body>
<script src="/js/course/course-list-add.js"></script>
</html>